package com.company.gas.mapper;

import com.company.gas.pojo.Staff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
/**
 * @author: Li Guangdi
 *
 */
//mybatis的mapper类
@Mapper
@Repository
public interface StaffMapper {
    List<Staff> selectAll();

    Staff queryStaffById(@Param(value = "staffId") String staffId);

    int addStaff(@Param(value = "staffId") String staffId, @Param(value = "staffName") String staffName,
                 @Param(value = "department") String department, @Param(value = "position") String position,
                 @Param(value = "staffPhone") String staffPhone,
                 @Param(value = "salary") BigDecimal salary, @Param(value = "flag") Integer flag,
                 @Param(value = "createBy") String createBy, @Param(value = "modifyBy") String modifyBy);

    int updateStaff(@Param(value = "staffId") String staffId, @Param(value = "staffName") String staffName,
                    @Param(value = "department") String department, @Param(value = "position") String position,
                    @Param(value = "staffPhone") String staffPhone,
                    @Param(value = "salary") BigDecimal salary, @Param(value = "flag") Integer flag,
                    @Param(value = "modifyBy") String modifyBy);

    int deleteStaff(@Param(value = "staffId") String staffId);
}
